<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 递归就是代码本来要写不知道多少次，全是重复的，用递归逻辑只有一次，然后自己调自己
    var count = 100
    var num = 0
    function sayStory(){
      num++
      console.log('山上有座庙')
      console.log('庙里有个和尚')
      console.log('和尚讲故事')
      if(num < count){
        sayStory()
      }

    }
    sayStory()
  </script>
</body>
</html>
